home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr22 / gnplt.zip / SURFACE1.DEM < prev    next >
Text File  |  1993-09-15  |  4KB  |  142 lines

  1. #
  2. # $Id: surface1.demo 3.38.2.6 1992/11/14 02:25:21 woo Exp $
  3. #
  4. set samples 21
  5. set isosample 11
  6. set xlabel "X axis" -3,-2
  7. set ylabel "Y axis" 3,-2
  8. set zlabel "Z axis" -5
  9. set title "3D gnu plot demo"
  10. set label 1 "This is the surface boundary" at -10,-5,150 center
  11. set arrow 1 from -10,-5,120 to -10,0,0 nohead
  12. set arrow 2 from -10,-5,120 to 10,0,0 nohead
  13. set arrow 3 from -10,-5,120 to 0,10,0 nohead
  14. set arrow 4 from -10,-5,120 to 0,-10,0 nohead
  15. set xrange [-10:10]
  16. set yrange [-10:10]
  17. splot x*y
  18. pause -1 "Hit return to continue (1)"
  19. set noarrow
  20. set nolabel
  21. set grid
  22. splot x**2+y**2, x**2-y**2
  23. pause -1 "Hit return to continue (2)"
  24. rep x*y
  25. pause -1 "Hit return to continue (3)"
  26. rep (x**3+y**3)/10
  27. pause -1 "Hit return to continue (4)"
  28. set ticslevel 0.0
  29. set title "3D gnu plot demo ( ticslevel = 0.0 )"
  30. rep
  31. pause -1 "Hit return to continue (5)"
  32. set ticslevel 2.0
  33. set title "3D gnu plot demo ( ticslevel = 2.0 )"
  34. rep
  35. pause -1 "Hit return to continue (6)"
  36. set ticslevel 0.5
  37. set title "3D gnu plot demo ( ticslevel = 0.5 )"
  38. rep
  39. pause -1 "Hit return to continue (7)"
  40. set title "3D gnu plot demo"
  41. set nogrid
  42. splot x*y with points
  43. pause -1 "Hit return to continue (8)"
  44. set noxtics
  45. set noytics
  46. set xrange [-1:1]
  47. set yrange [-1:1]
  48. set title "Surfaces with no grid or tics"
  49. splot x*y with lines, x**2*y**3 with dots, x**3*y*2 with points
  50. pause -1 "Hit return to continue (9)"
  51. set xtics ("low" -3, "mid" 0, "high" 3)
  52. set ytics -2,0.5,2
  53. set xrange [-3:3]
  54. set yrange [-3:3]
  55. set log z
  56. set title "Surfaces with z log scale"
  57. splot x**2*y**2 + 2, x**2*y**4 + 2, x**4*y**2 + 2
  58. pause -1 "Hit return to continue (10)"
  59. set nolog z
  60. set xtics
  61. set ytics
  62. set xrange [-1:1]
  63. set yrange [-1:1]
  64. set samples 51
  65. set isosample 21
  66. set dummy u,v
  67. set title "3D gnu plot demo"
  68. splot u*v / (u**2 + v**2 + 0.1)
  69. pause -1 "Hit return to continue (11)"
  70. splot [x=-3:3] [y=-3:3] sin(x) * cos(y)
  71. pause -1 "Hit return to continue (12)"
  72. set zrange [-0.35:0.35]
  73. replot
  74. pause -1 "Hit return to continue (13)"
  75. set title "Sinc function"
  76. set zrange [-1:1]
  77. set label 1 "This is equal to 1" at -5,-2,0.75 right
  78. set arrow 1 from -5,-2.1,0.75 to 0,0,1
  79. sinc(u,v) = sin(sqrt(u**2+v**2)) / sqrt(u**2+v**2)
  80. splot [-5:5.01] [-5:5.01] sinc(u,v)
  81. pause -1 "Hit return to continue (14)"
  82. set view 70,20,1
  83. set zrange [-0.5:1.0]
  84. set ztics -1,0.25,1
  85. set label 1 "This is equal to 1" at -5,-2,1.5 centre
  86. set arrow 1 from -5,-2.1,1.4 to 0,0,1
  87. splot [-12:12.01] [-12:12.01] sinc(u,v)
  88. pause -1 "Hit return to continue (15)"
  89. set noarrow
  90. set ztics
  91. set nolabel
  92. set log
  93. set auto
  94. set title "This has logarithmic scale"
  95. splot [x=1:15] [y=1:15] x**2+y**2
  96. pause -1 "Hit return to continue (16)"
  97. set nolog
  98. set xrange [0:15]
  99. set yrange [0:15]
  100. set auto
  101. set zrange [-0.6:0.7]
  102. set data style lines
  103. set title "Data grid plotting"
  104. set parametric
  105. splot "glass.dat"
  106. pause -1 "Hit return to continue (17)"
  107. splot "glass.dat" using 3:2:1
  108. pause -1 "Hit return to continue (18)"
  109. set zrange [-1.2:1.2]
  110. set noparametric
  111. splot "glass.dat" using 1, "glass.dat" using 2, "glass.dat" using 3
  112. pause -1 "Hit return to continue (19)"
  113. set param
  114. set title "Test of spherical transform"
  115. set mapp sphe
  116. splot "glass.dat"
  117. pause -1 "Hit return to continue (20)"
  118. #
  119. # Clean up:
  120. #
  121. set nopar
  122. set mapp cart
  123. set samples 100
  124. set isosamples 10
  125. set view 60,30,1,1
  126. set xrange [-10:10]
  127. set yrange [-10:10]
  128. set zrange [-10:10]
  129. set auto
  130. set title "" 0,0
  131. set xlabel "" 0,0
  132. set ylabel "" 0,0
  133. set zlabel "" 0,0
  134. # mandelbrot demo
  135. set isosamples 100
  136. set hidden3d
  137. compl(a,b)=a*{1,0}+b*{0,1}
  138. mand(z,a,n) = n<=0 || abs(z)>100 ? 1:mand(z*z+a,a,n-1)+1
  139. splot [-2:1][-1.5:1.5] mand({0,0},compl(x,y),50)     
  140. # TANAKA Masaki  (Tokyo Institute of technology)
  141. #                 masaki@isea.is.titech.ac.jp
  142.